package co.fitstart.entity.course.schedule;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 
 * @author mohanlan
 *
 */
@Entity
@Table(name = "course_schedule_attr")
@JsonIgnoreProperties(value={"hibernate_lazy_initializer","handler","fieldHandler"})
public class CourseScheduleAttribute {
    
    @Id
    @GeneratedValue
    private Long id;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private CourseSchedule courseSchedule;
    
    private String name;
    
    private String value;
    
    /**
     * The default constructor
     */
    public CourseScheduleAttribute() {
        
    }
    
    /**
     * 
     * @param courseRound
     * @param name
     * @param value
     */
    public CourseScheduleAttribute(CourseSchedule courseSchedule, String name, String value) {
       this.courseSchedule = courseSchedule;
       this.name = name;
       this.value = value;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the courseSchedule
     */
    public CourseSchedule getCourseSchedule() {
        return courseSchedule;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param courseSchedule the courseSchedule to set
     */
    public void setCourseSchedule(CourseSchedule courseSchedule) {
        this.courseSchedule = courseSchedule;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }
}
